#! /bin/perl

$cpuinfo = `cat /proc/cpuinfo`;
$lspci = `lspci`;
if($lspci =~ /(.*?)VGA compatible controller: (.*?)\n/){
	my $vga = $2;
    `sudo -k`
	if($vga =~ /^VMware(.*?)/){
		print $vga;
		if($vga =~ /^VMware(.*?)/){
            print `sudo -S pacman -S xf86-video-vmware<<EOF\n$pwd\ny\nEOF`
        }elsif($vga =~ /AMD/){
             print `sudo -S pacman -S xf86-video-ati<<EOF\n$pwd\ny\nEOF`
        }elsif($vga =~ /nvida/){
             print `sudo -S pacman -S xf86-video-nouveau<<EOF\n$pwd\ny\nEOF`
        }else{
            print `sudo -S pacman -S xf86-video-vesa<<EOF\n$pwd\ny\nEOF`
        }
	}
}

#@ARGV

